package kr.co.shoppingmall.noticeboard;

import java.util.HashMap;
import java.util.List;


public class NoticeBoardServiceImpl implements NoticeBoardService {

	// BoardService 는 BoardDAO 에 의존
	private NoticeBoardDAO noticeboardDAO;
	// Setter Injection 으로 의존성을 주입
	public void setBoardDAO(NoticeBoardDAO noticeboardDAO) {
		this.noticeboardDAO = noticeboardDAO;
	}
	
	@Override
	public void insertNoticeBoard(NoticeBoardDTO dto) {
		noticeboardDAO.insertNoticeBoard(dto);
	}

	@Override
	public List getNoticeBoardList(HashMap map) {
		return noticeboardDAO.getNoticeBoardList(map);
	}

	@Override
	public int getCount() {
		return noticeboardDAO.getCount();
	}

	@Override
	public NoticeBoardDTO getNoticeBoard(int nboard_num) {
		return noticeboardDAO.getNoticeBoard(nboard_num);
	}

	@Override
	public void updateNoticeBoardHit(int nboard_num) {
		noticeboardDAO.updateNoticeBoardHit(nboard_num);
	}

	@Override
	public void deleteNoticeBoard(NoticeBoardDTO dto) {
		noticeboardDAO.deleteNoticeBoard(dto);
	}

}
